using System.Collections.Generic;
using FireStarter.Base;
using FireStarterModeller.BO;

namespace FireStarter.CodeGeneration
{
    public abstract class ClassGenerator
    {
        private readonly string _className;
        private readonly string _projectName;
        private readonly string _projectPath;
        private const string _fileExtention = ".cs";
//        protected string _fileContents;

        protected ClassGenerator(string className, string projectName, string projectPath)
        {
            _className = className;
            _projectName = projectName;
            _projectPath = projectPath;
        }

        public string ClassName
        {
            get { return _className; }
        }
        public string FileName
        {
            get { return _className + _fileExtention; }
        }

        public string ProjectName
        {
            get { return _projectName; }
        }

        public string ProjectPath
        {
            get { return _projectPath; }
        }

//        public string FileContents
//        {
//            get { return _fileContents; }
//        }

        //                    string contents = boTestProjectTemplateLoader.GetTestBaseClass(_projectName);
        //            string uiManagerFileName = Utilities.CreateFile(ProjectPath, "TestBase.cs", contents);
        //            _projectFileManager.AddCodeFile(uiManagerFileName);

        //public string GetTestBaseClass(string projectName)
        //{
        //    const string fileName = "";
        //    string fileContents;
        //    if (!loadFromFile(fileName, out fileContents))
        //    {
        //        fileContents = Templates.Test_BO_TestBase;
        //    }
        //    SetNamespaceTag(ref fileContents, projectName);
        //    return fileContents;
        //}
        public virtual void Construct(){}

        public abstract void Compile();

        public abstract void GenerateCode();

        public abstract string GetValueReplacementContent(string tagContent);

        public abstract IList<IModelClass> GetModelElementsCollection(string tagContent);
    }
}